/**
 * 聊天记录列表，用于消息界面显示
 * [
 *     {
 *       "id": 1,
 *       "userName": "admin",
 *       "headImgUrl": "avatar-12d2d2708e0741d4806e72f91e20b115",
 *       "messageList": [
 *         {
 *           "id": 3,
 *           "fromUsername": "user1",
 *           "toUsername": "admin",
 *           "content": "你好",
 *           "createTime": "2025-04-02 13:59:34",
 *           "type": "Text"
 *         },
 *         {
 *           "id": 2,
 *           "fromUsername": "admin",
 *           "toUsername": "admin",
 *           "content": "你好2",
 *           "createTime": "2025-03-31 21:46:03",
 *           "type": "Text"
 *         }
 *       ]
 *     }
 * ]
 */
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useChatMessageStore = defineStore('chatMessage', () => {
    const chatMessageList = ref([]) // 聊天记录列表
    const inChatIndex = ref() // 当前聊天记录索引
    return { chatMessageList, inChatIndex }
})
